#include <iostream>
#include <unistd.h>

using namespace std;

int main()
{
    int n = fork();
    while (true)
    {
        if (n == 0)
        {
            cout << "i am child" << endl;
        }
        else
        {
            cout << "i am father" << endl;
        }
    }

    return 0;
}